\def\fileversion{1.4}
\def\filedate{1994/04/16}
%
% This document describes a LaTeX2e NFSS setup which declares PostScript
% fonts, and the associated package files
%
\def\PS{\textsc{PostScript}}
\documentclass{article}
\begin{document}
\title{Notes on setup of PostScript fonts for \LaTeXe}
\author{Sebastian Rahtz}
\date{\filedate}
\maketitle
%
\tableofcontents
\section{Introduction}

This set of files offers a complete working setup for \LaTeXe's NFSS
and \PS\ fonts; it is based on the system I created between 1989 and
1991 for Southampton Computer Science, checked and updated for NFSS2,
and subsequently \LaTeXe.  Package files are provided for the common
PostScript fonts. You should be familiar with the standard \LaTeXe\ 
files and their use to follow this document. Thanks are due to many
people for correcting errors and helping, including Michel Goossens,
Berthold Horn, Alan Jeffrey, Howard Marvel, Frank Poppe, Andrew
Trevorrow\ldots

Packages are offered to set documents in the common PostScript fonts,
plus common free fonts (Charter, Utopia etc).  All Lucida fonts are
supported, MathTime fonts, and a selection of other Adobe and Monotype
fonts. It is assumed that Karl Berry's naming scheme is followed.
Textures users, however, can get a basic set of .sty and .fd files
using Textures font names by running \TeX\ on \texttt{textures.ins}.

\textbf{NOTE:} I have included \emph{new} font metric and virtual font
files for PostScript fonts, for those who wish to use Cork encoding.
These have been generated with Alan Jeffrey's \emph{fontinst} program,
and need a driver which understands virtual fonts.

\section{Portability}

My personal setup uses a \PS\ printer, Karl Berry's names for \PS\
fonts in \TeX, virtual fonts to map \PS\ to CMR layout, and I process
my \verb|.dvi| files with Rokicki's dvips. Other systems may fall
over.  

\section{Standard installation}
This distribution is provided as a set of \verb|.dtx|
files which need to be unpacked using \emph{docstrip} to create user
files. There are two types of file which result:
\begin{enumerate}
\item \verb|.fd| files which describe a particular font
  encoding/family combination
\item \verb|.sty| files which change the font defaults to use some new
  group of fonts (often just one default is changed)
\end{enumerate}
Scripts are provided for \emph{docstrip} in the form of \texttt{.ins}
files, which simply need to be run through \TeX; when that has been
done, install all the \texttt{.sty} and \texttt{.fd} files that result in a
directory where \LaTeX\ will find them.

You have an important decision to make at some point --- are you going
to use fonts encoded in the `Cork' layout, or the old ones which look
like the CM fonts described in the \TeX\ book? This manual will not
attempt to explain why you should or should not use Cork fonts\ldots
Font description (\texttt{.fd}) files are created for both T1 and OT1
encoding by the installation procedure.

If you follow the Cork-encoding route, you need different \TeX\ font
metric files and virtual font files. Suitable files for the standard
35 fonts, in both T1 and OT1 encoding, 
are in the \texttt{fonts/metric} CTAN directory, where you
will also find a Unix-style `Makefile' which shows how to create
suitable metrics for extra Type1 fonts you may have --- you will need the
\emph{fontinst} package to make this work.

\emph{Important.} If you use the Cork (T1 in \LaTeXe\ scheme) encoding, you
will probably also need the `dc' CM fonts to go with them, for maths
and so on.
\begin{quote}
  \begin{tabular}{|ll|}
\hline
Family name & Full name\\
\hline
pag&Adobe AvantGarde\\
pbb&Adobe MBembo\\
pbk&Adobe Bookman\\
pcr&Adobe Courier\\
phv&Adobe Helvetica\\
pnc&Adobe NewCenturySchoolbook\\
ppl&Adobe Palatino\\
ptm&Adobe Times Roman\\
pzc&Adobe ZapfChancery\\
psy&Adobe Symbol font\\
pzd&Adobe Zapf Dingbats\\
\hline
\end{tabular}
\end{quote}

\section{Installation of non-standard fonts and packages}
If you want to create font files and package files for a greater
selection of faces (see Appendix A for details of fonts, and table
\ref{exstyles} for packages), run \TeX\ again on the other
\texttt{.ins} files. These are a fairly random selection of fonts
which the author needs, not put together in any rational way. You will
not be asked about encoding in this case --- T1 is assumed.

To create font and package files for Lucida and Lucida Bright (including
Lucida Bright maths), run \TeX\ on \texttt{lucida.ins}. 

To create an \LaTeXe\ package file for typesetting Object Z,
run \TeX\ on \texttt{oz.ins}.  

\section{Testing}
All installers should run \texttt{test0.tex} through \LaTeX\ and print
the result, after installing their chosen setup, to ensure that things
are more or less working. \texttt{test1.tex} will exercise your supply of
PostScript fonts.

\textbf{Do not worry if nothing but \texttt{test0.tex} works!}.
\texttt{test0.ps} is a prebuilt version of \texttt{test0.tex} for you
to compare.

\section{User interface}

The daily user will simply use one of the packages \texttt{times},
\texttt{newcent}, \texttt{helvet}, \texttt{palatino} etc to change the
default text fonts for one or more of the roman, sans-serif and
typewriter faces.  Table \ref{styles} lists the effects of the package
files created in the installation procedure.

The special package \texttt{pifont} gives access to the Dingbat
and Symbol fonts. This is described in \emph{The \LaTeX\ Companion}.
\begin{table}
\begin{small}
  \begin{tabular}{|l|lll|}
\hline
Package & Sans font & Roman font & Typewriter font\\
\hline
times.sty & Helvetica & Times & Courier\\
palatino.sty & Helvetica & Palatino & Courier\\
helvet.sty   & Helvetica & &\\
avant.sty   & AvantGarde & &\\
newcent.sty & AvantGarde & NewCenturySchoolbook & Courier\\
bookman.sty &  AvantGarde & Bookman & Courier\\
\hline
\end{tabular}
\end{small}
\caption{Effect of package files\label{styles}}
\end{table}
Note that maths fonts will stay the same unless you have suitable
fonts to load. If the Adobe Lucida Maths fonts have been purchased, and
appropriate metrics obtained, loading \texttt{lucmath} will remove
all reference to CMR fonts in the document. Alternatively, purchase
the Lucida Bright font set and use the \texttt{lucbr} package.

\subsection{Important --- variant OT1 font encoding}
The package files assume that you have already made the choice of
which text font encoding scheme you prefer (T1 or OT1), and that it is
the default when the \LaTeX\ job starts. However, you may need to
override the defaults if you use the OT1 \verb|tfm| files distributed
with dvips, as some characters are not in the expected places.
Similarly, Textures users will find things not quite right. For
this purpose the package file \verb|ot1var| is provided; this changes
some macro definitions to make the necessary fixes, with options
[dvips] and [textures] (default its [dvips]).

\section{New fonts, and package-writers interface} 
Setting up new fonts, so as to create \texttt{.fd} files, is exactly as
documented in the main \LaTeXe\ documentation. Suitable models for a
large multifont installation can be found in \texttt{psfonts.fdd}
(covering both old \TeX\ encoding and Cork encoding), but a \texttt{.fd}
file for a single font is easy to write by hand, once you know which
font encoding it uses. Thus the declaration file \texttt{OT1ppl.fd} for
old-style \TeX-encoding Palatino (OT1) could look like this:
\begin{verbatim}
\DeclareFontFamily{OT1}{ppl}{}
\DeclareFontShape{OT1}{ppl}{m}{n}{<->pplr}{}
\DeclareFontShape{OT1}{ppl}{m}{it}{<->pplri}{}
\DeclareFontShape{OT1}{ppl}{b}{n}{<->pplb}{}
\DeclareFontShape{OT1}{ppl}{b}{it}{<->pplbi}{}
\DeclareFontShape{OT1}{ppl}{m}{sc}{<->pplrc}{}
\DeclareFontShape{OT1}{ppl}{m}{sl}{<->pplro}{}
%
\DeclareFontShape{OT1}{ppl}{b}{sc}{<->sub * ppl/m/sc}{}
\DeclareFontShape{OT1}{ppl}{b}{sl}{<->sub * ppl/b/it}{}
\DeclareFontShape{OT1}{ppl}{bx}{n}{<->sub * ppl/b/n}{}
\DeclareFontShape{OT1}{ppl}{bx}{it}{<->sub * ppl/b/it}{}
\DeclareFontShape{OT1}{ppl}{bx}{sc}{<->sub * ppl/m/sc}{}
\DeclareFontShape{OT1}{ppl}{bx}{sl}{<->sub * ppl/m/sl}{}
\endinput
\end{verbatim}
Once the font family and encoding is declared (I use the three-letter unique
combinations devised by Karl Berry for all PostScript fonts), each
combination of series and style is mapped to the name of a \texttt{tfm}
file; we don't need to worry about which sizes are available, because
the PostScript fonts can be scaled to any size. The second part of the
file sets up some substitutions for situations where we may have no
font available (bold small caps, bold slanted, or bold-extended
series).

If you need to create a new style file which can be used in the same
way as the ones provided, simply use standard \LaTeXe\ constructs. This
is \texttt{times.sty} (with banner information removed):
\begin{verbatim}
\ProvidesPackage{times}
\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}
\def\bfdefault{b}
\endinput
\end{verbatim}
Note the switch to make `b' default for bold rather than `bx'.

If appropriate you could \verb|\input| the style files described
above, and use the utility macros to tailor your environment.

\section*{Appendix: non-standard fonts}

\begin{tabular}{|ll|}
\hline
Family name & Full name\\
\hline
bch & Bitstream Charter\\
hlc&B\&H Lucida Bright\\
hlcs&B\&H Lucida Sans\\
hlct&B\&H Lucida Bright Typewriter\\
mgm&Monotype Garamond\\
mim&Monotype Imprint\\
mnp&Monotype NewsPlantin\\
mnt&Monotype Times New Roman\\
mpi&Monotype Plantin\\
mpp&Monotype Perpetua\\
pgm&Adobe ITC Garamond\\
pgs&Adobe MGillSans\\
pgs&Adobe MGillSans\\
plc&Adobe Lucida\\
plcs&Adobe Lucida Sans\\
pnb&NewBaskerville\\
pop&Adobe Optima\\
pun&Adobe Univers\\
put&Adobe Utopia-Regular\\
unmr&URW NimbusRoman-Regular\\
unmrs&URW NimbusSans-Regular\\
\hline
\end{tabular}

\begin{table}
\begin{small}
  \begin{tabular}{|l|lll|}
\hline
Package & Sans font & Roman font & Typewriter font\\
\hline
basker.sty & & Monotype Baskerville &\\
bembo.sty &  & Bembo & \\
charter & & Bitstream Charter & \\
garamond.sty & & Adobe Garamond & \\
gill  & Gill Sans & & \\
imprint  & Monotype Imprint &\\
mathtime & Helvetica & Times & Courier \\
mtimes & & Monotype Times & \\
nimbus  & URW NimbusSans-Regular & URW NimbusRoman-Regular & \\
optima & & Adobe Optima  & \\
perpetua  & & Monotype Perpetua& \\
plantin  & & Monotype NewsPlantin&\\
univers  & Adobe Univers && \\
utopia  & & Utopia & \\
lucid.sty & LucidaSans & Lucida & Courier\\
lucbr.sty & LucidaSans & LucidaBright & LucidaTypewriter\\
\hline
\end{tabular}
\end{small}
\caption{Effect of extra package files\label{exstyles}}

Notes: a) \texttt{lucbr.sty} uses the font names for Lucida Bright
which conform to Karl Berry's scheme. Use package optipn `yy' to use
the font names supplied by Y\&Y. b) the \verb|mathtime| package sets
up the MathTime fonts for math. If you want to use just standard
PostScript fonts for math, Alan Jeffrey's \emph{mathptm} package does
as good a job as possible (though it still needs access to some CMR
math fonts).
\end{table}

\end{document}







